package se.nestorthon.branding.server.webapp;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.handler.AbstractHandler;

public class SimpleHandler extends AbstractHandler {

	public void handle(String target, Request req, HttpServletRequest servletReq,
			HttpServletResponse resp) throws IOException, ServletException {
		
		resp.setContentType("text/html;charset=utf-8");
		resp.setStatus(HttpServletResponse.SC_OK);
		req.setHandled(true);
		HttpSession session = req.getSession();
		resp.getWriter().write(session.toString());
	}

}
